<?php
namespace app\common\validate;

use think\Validate;

class Address extends Validate
{
    protected $rule =   [
        'name'  => 'require',
        'phone'  => 'require|length:11|number',
        'province'  => 'require',
        'city'  => 'require',
        'area'  => 'require',
        'province_id'  => 'require',
        'city_id'  => 'require',
        'area_id'  => 'require',
        'address'  => 'require',
        'is_default'  => 'require',

    ];

    protected $message  =   [

        'name.require' => '名字不能为空',
        'phone' => '手机号不正确',
        'province.require' => '省不能为空',
        'province_id.require' => '省不能为空',
        'city.require' => '市不能为空',
        'city_id.require' => '市不能为空',
        'area.require' => '区不能为空',
        'area_id.require' => '区不能为空',
        'address.require' => '区不能为空',
        'is_default.require' => '区不能为空',

    ];
}